﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;


/**
* @Author: AdinZ
* @Q  Q : 1454269
* @Email:adinz@adinz.com
* @Created: 2014/3/31 16:43:38
*
* */
namespace Novel.Sys.Model
{
    /* 小说章节 */
    public class novel_chapter
    {
        private int iD;
        private int aid;
        private string chaptername;
        private int chapternum;
        private int size;
        private DateTime created;
        private DateTime modified;
        private int isvip;
        private double price;
        private int status;
        private string articlepath;
        private string collectionMark;
        private int local;
        /// <summary>
        /// 是否本地化 1=本地化了
        /// </summary>
        public int Local
        {
            get { return local; }
            set { local = value; }
        }

        public string CollectionMark
        {
            get { return collectionMark; }
            set { collectionMark = value; }
        }
        /// <summary>
        /// 图书地址
        /// </summary>
        public string Articlepath
        {
            get { return articlepath; }
            set { articlepath = value; }
        }

        public novel_chapter()
        {
        }

        /// <summary>
        /// 章节id 
        /// </summary>
        public int ID
        {
            get { return iD; }
            set { iD = value; }
        }
        /// <summary>
        /// 文章id
        /// </summary>
        public int Aid
        {
            get { return aid; }
            set { aid = value; }
        }
        /// <summary>
        /// 本章名称
        /// </summary>
        public string Chaptername
        {
            get { return chaptername; }
            set { chaptername = value; }
        }
        /// <summary>
        /// 章节序号
        /// </summary>
        public int Chapternum
        {
            get { return chapternum; }
            set { chapternum = value; }
        }
        /// <summary>
        /// 本章大小
        /// </summary>
        public int Size
        {
            get { return size; }
            set { size = value; }
        }
        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime Created
        {
            get { return created; }
            set { created = value; }
        }
        /// <summary>
        /// 修改时间
        /// </summary>
        public DateTime Modified
        {
            get { return modified; }
            set { modified = value; }
        }
        /// <summary>
        /// 是否是vip,0=免费;1=vip免费读;2=按章收费
        /// </summary>
        public int Isvip
        {
            get { return isvip; }
            set { isvip = value; }
        }
        /// <summary>
        /// 本章价格
        /// </summary>
        public double Price
        {
            get { return price; }
            set { price = value; }
        }
        /// <summary>
        /// 审核;0=未审核;1=审核
        /// </summary>
        public int Status
        {
            get { return status; }
            set { status = value; }
        }
        public void Reset()
        {
            iD = 0;
            aid = 0;
            chaptername = null;
            chapternum = 0;
            size = 0;
            created = DateTime.Now;
            modified = DateTime.Now;
            isvip = 0;
            price = 0;
            status = 0;
        }

        public void AssignFrom(novel_chapter AObj)
        {
            if (AObj == null)
            {
                Reset();
                return;
            }
            iD = AObj.iD;
            aid = AObj.aid;
            chaptername = AObj.chaptername;
            chapternum = AObj.chapternum;
            size = AObj.size;
            created = AObj.created;
            modified = AObj.modified;
            isvip = AObj.isvip;
            price = AObj.price;
            status = AObj.status;
        }

    }

}

